import { _decorator, AnimationClip, Component, Animation, SpriteFrame } from 'cc';
import { FSM_PARAMS_TYPE_ENUM } from '../Enums';
import State from './State';
import { StateMachine } from './StateMachine';


const { ccclass, property } = _decorator;

export abstract class SubStateMachine {

    private _currentState: State

    /**状态机列表 */
    stateMachine: Map<string, State> = new Map()

    constructor(public fsm: StateMachine) {

    }

    get currentState() {
        return this._currentState
    }
    
    set currentState(state: State) {
        this._currentState = state
        this._currentState.run()
    }

    abstract run(): void


}


